<!doctype html>
<html lang="{{ config('app.locale') }}">
<head>
    <meta charset="utf-8">
    <meta name="description" content="久趣英语专注于5-12周岁儿童在线视频教学，100%美国外教，通过游戏化教学，让每一节课都充满趣味。久趣英语致力于让上课变得好玩。" />
    <meta name="keywords" content="儿童在线英语,视频教学,久趣英语,Qkids,qkids,北美外教,在线少儿英语">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="baidu-site-verification" content="psCzDlwdUq" />
    <meta name="_token" content="{{ csrf_token() }}" />
    <script src="{{env('CDN_RESOURCE')}}/js/jquery-2.1.4.min.js"></script>
    <script src="{{env('CDN_RESOURCE')}}/js/parallax/parallax.min.js"></script>
    <link rel="shortcut icon" type="image/x-icon" href="../icon/icon_web.png"/>
@yield('resources')


<!--[if (gt IE 9)|!(IE)]><!-->
    <link href="{{env('CDN_RESOURCE')}}/css/site1.css" rel="stylesheet" type="text/css"><!--<![endif]-->

    <!--[if lt IE 10]>
    <link href="{{env('CDN_RESOURCE')}}/css/site.ie.css" rel="stylesheet" type="text/css">
    <![endif]-->
</head>
<body>

{{--<div class="header-padding"></div>--}}
<div class="s-header">
    <a href="/">
        <div class="s-h-logo f-left ">
            <div class="logo"></div>
            <div class="ani-dot-s">
            </div>
        </div>
    </a>

  <div class="s-h-nav ">

    <a href="/"><span class="nav">首页</span></a>
    <a href="/course"><span class="nav">课程体系</span></a>
    <a href="/teachers"><span class="nav">外教团队</span></a>
    <a href="/download"><span class="nav">软件下载</span></a>
    <a href="/aboutus"><span class="nav">关于我们</span></a>
    <div class="cursor"></div>
  </div>


    @if(Request::path() == '/' || strpos(Request::path(), 'order/') !== false )
        <div class="buy-btn" id="hBuyBtn">
            购买
        </div>

    @else
        <a href="/lessonplan">
            <div class="buy-btn" id="hBuyBtn" style="display: none;">
                购买
            </div>
        </a>
    @endif


</div>


<div class="wrapper">
    @yield('content')
    <div class="push"></div>
</div>


<div id="alertBox" class="alert-box"></div>


<div class="footer">


        <div class="cur-padding" style="display: none;">
            @if(strpos(Request::path(), 'order/') === false )
                <div class="rec-plan">
                    <div class="fee">
                        ¥ <span class="money">100</span> /4 课时
                    </div>

                    <a href="/order/4">
                        <div class="buy-now">
                            立即购买
                        </div>
                    </a>
                </div>
            @endif
        </div>


    <div class="s-footer">
        <div class="footer-left" >
            <div class="s-f-logo">
                <div class="blue-logo"></div>
            </div>


            {{--<div class="qr-code">--}}
                {{--<div class="wechat-icon icon"></div>--}}
                {{--<div class="qr-img">--}}
                    {{--<div class="arrow-up"></div>--}}
                    {{--<img src = "{{env('CDN_RESOURCE')}}/img/wechat_qr.jpg" />--}}
                {{--</div>--}}
            {{--</div>--}}

            <div class="qrcode">
              <img src = "{{env('CDN_RESOURCE')}}/img/wechat_qr.jpg" />
            </div>
          <style>
            .qrcode img {
              width: 200px;
              height: 200px;
              margin-top: -15px;
              margin-left: 30px;
            }
          </style>

            <div class="copy-right">
                Copyright @2017-2018 Qkids All Rights Reserved
                &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
                闽ICP备12021838号-3
            </div>

        </div>

        <div class="footer-right">

            <ul class="footer-ul left">
                <li>
                    <span class="f-u-h">Qkids久趣</span>
                    <a href="/"><span>首页</span></a>
                    <a href="/course"><span>课程体系</span></a>
                    <a href="/teachers"><span>外教团队</span></a>
                    <a href="/aboutus"><span>关于我们</span></a>
                </li>
                <li>
                    <span class="f-u-h">更多</span>
                    <a href="/download" target="_blank"><span>软件下载</span></a>
                    <a href="http://teacher.qkids.cn/" target="_blank"><span style="margin-top: -3px;">Teacher's Portal</span></a>
                </li>
                <li>
                    <span class="f-u-h">联系我们</span>
                    <div class="contact">
                      <span class="h">电话</span>
                      <span>400-8558-297</span>
                    </div>
                    <div class="address" style="margin-top: 30px;">
                        <div class="h" style="margin-bottom: 5px;">地址</div>
                        <div class="text">
                            <span class="up">北京办事处: 北京市朝阳区干杨村甲16号院首华大厦</span>
                            <span class="down">广州办事处: 广州市天河区元岗路310号D栋307单元</span>
                            <span class="down">深圳办事处: 深圳湾科技生态园一期2栋C座503室</span>
                            <span class="down">厦门总公司: 厦门市思明区软件园二期望海路16号之三</span>

                        </div>
                    </div>

                    <div class="contact">
                        <span class="h">邮箱</span>
                        <span>service@qkids.cn</span>
                    </div>

                    {{--<div class="contact ">--}}
                        {{--<span class="h">电话</span>--}}
                        {{--<span>400-8558297</span>--}}
                    {{--</div>--}}
                </li>
            </ul>
        </div>
    </div>
</div>

@include('template.ga')

</body>
</html>


@yield('script')

<script type="text/javascript">

    //ie 9 允许跨域
    jQuery.support.cors = true;

    // 获取URL参数
    function getQueryString (name) {
      var r1 = getMatched(name, window.location.search);
      if (r1) return r1;
      var key = arguments[1];
      if (key) {
        return getMatched(name, window.localStorage.getItem(key));
      }
      return null;

      function getMatched (name, string) {
        if (string) {
          var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
          var len = string.indexOf('?') == 0 ? 1 : 0;
          var r = string.substr(len).match(reg);
          if (r != null) return unescape(r[2]);
        }
        return null;
      }
    }
    // 信息提示框
    function toastAlert(Msg, status) {

      if (status === 1) {
        $('#alertBox').removeClass('wrong-input').addClass('success-toast');
      }
      else {
        $('#alertBox').removeClass('success-toast').addClass('wrong-input');
      }
      $('#alertBox').text(Msg).fadeIn();

      setTimeout(function () {
        $('#alertBox').fadeOut();
      }, 2000);
    }

    window.referenceKey = 'QKidsReference';
    window.reference = getQueryString('_r') || '';
    // 获取絮叨来源参数
    if (window.reference) {
      window.localStorage.setItem(window.referenceKey, JSON.stringify({
        rawData: getQueryString('_r'),
        expires: new Date().getTime() / 1000 + 24 * 3600
      }));
    } else {
      try {
        var referenceObj = JSON.parse(window.localStorage.getItem(window.referenceKey));
        if (referenceObj && referenceObj.rawData && new Date().getTime() / 1000 < referenceObj.expires) {
          window.reference = referenceObj.rawData;
        }
      } catch (e) {
        console.log(e);
      }
    }

    $(document).ready(function (fn) {
        $(window).scroll(function () {

            //控制滚动时间重复触发
            setTimeout(function () {

                if ($(document).scrollTop() >= ($('.s-header').height() && $('.scroll-point').height() !== 0)
                    && !$('.s-header').hasClass('site-header-scroll')) {
                    $('.s-header').addClass('s-header-scroll');
                    $('.s-h-nav').addClass('nav-menu-scroll');
                    $('.cover-mask').addClass('cover-mask-scroll');
                }

                else if ($(document).scrollTop() <= ($('.s-header').height()) && $('.scroll-point').height() !== 0) {
                    $('.s-header').removeClass('s-header-scroll');
                    $('.s-h-nav').removeClass('nav-menu-scroll');
                    $('.cover-mask').removeClass('cover-mask-scroll');
                }
                tur = true;
            }, 100);
            tur = false;
        });

        if ($('.scroll-point').height() === 0) {
            $('.s-header').addClass('s-header-scroll');
        }
    })
</script>

